3.1.56 \(\int \frac {1}{a+a \sin (c+d x)} \, dx\) [56]

Optimal. Leaf size=23 \[ -\frac {\cos (c+d x)}{d (a+a \sin (c+d x))} \]

[Out]

-cos(d*x+c)/d/(a+a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2727} \begin {gather*} -\frac {\cos (c+d x)}{d (a \sin (c+d x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[c + d*x])^(-1),x]

[Out]

-(Cos[c + d*x]/(d*(a + a*Sin[c + d*x])))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{a+a \sin (c+d x)} \, dx &=-\frac {\cos (c+d x)}{d (a+a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(48\) vs. \(2(23)=46\).
time = 0.03, size = 48, normalized size = 2.09 \begin {gather*} \frac {2 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d (a+a \sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[c + d*x])^(-1),x]

[Out]

(2*Sin[(c + d*x)/2]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))/(d*(a + a*Sin[c + d*x]))

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 22, normalized size = 0.96

method result size
derivativedivides \(-\frac {2}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(22\)
default \(-\frac {2}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(22\)
risch \(-\frac {2}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\) \(23\)
norman \(\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-2/d/a/(tan(1/2*d*x+1/2*c)+1)

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 27, normalized size = 1.17 \begin {gather*} -\frac {2}{{\left (a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-2/((a + a*sin(d*x + c)/(cos(d*x + c) + 1))*d)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 42, normalized size = 1.83 \begin {gather*} -\frac {\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1}{a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-(cos(d*x + c) - sin(d*x + c) + 1)/(a*d*cos(d*x + c) + a*d*sin(d*x + c) + a*d)

________________________________________________________________________________________

Sympy [A]
time = 0.37, size = 27, normalized size = 1.17 \begin {gather*} \begin {cases} - \frac {2}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} & \text {for}\: d \neq 0 \\\frac {x}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((-2/(a*d*tan(c/2 + d*x/2) + a*d), Ne(d, 0)), (x/(a*sin(c) + a), True))

________________________________________________________________________________________

Giac [A]
time = 8.19, size = 21, normalized size = 0.91 \begin {gather*} -\frac {2}{a d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-2/(a*d*(tan(1/2*d*x + 1/2*c) + 1))

________________________________________________________________________________________

Mupad [B]
time = 6.43, size = 21, normalized size = 0.91 \begin {gather*} -\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + a*sin(c + d*x)),x)

[Out]

-2/(a*d*(tan(c/2 + (d*x)/2) + 1))

________________________________________________________________________________________